package com.wtp.wallpaper.es.document;

import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

@Data
@ToString
@Document(indexName = "product")  // Elasticsearch中的索引相当于MySQL中的表
public class Product {
    
    @Id
    private String id;  // 主键，映射Elasticsearch的_id

    private String name;

    private String description;

    private double price;

    // Getters and Setters
}
